package com.example.design.proxy.statical.buyhouse;

/**
 * @Description TOTO
 * @ClassName BuyHouseProxy
 * @Author Yumuhui
 * @Date 2020/5/14 0:41
 * @Version 1.0.0
 */
public class BuyHouseProxy implements BuyHouse {
    BuyHoisePerson person;

    public BuyHouseProxy(String userName) {
        this.person = new BuyHoisePerson(userName);
    }

    @Override
    public void buyHouse() {
        preRequest();
        person.buyHouse();
        postRequest();
    }

    public void preRequest() {
        System.out.println("买房前置工作");
    }
    public void postRequest() {
        System.out.println("买房后置工作");
    }
}
